package com.simple.datax.flow.constants;
/** 
 * @Title: ProcessResultConstants.java 
 * @Package com.simple.datax.flow.constants 
 * @Description: TODO(流程处理中的结果信息描述) 
 * @author tonney 
 * @date 2013-1-22 下午04:15:13 
 * @version V1.0 
 */
public class ProcessResultConstants {
	public static final int STATUS_MESSAGE_NULL = -1;
	public static final int STATUS_SUCCESS = 0;
	public static final int STATUS_FLOW_NULL = 1;
	public static final int STATUS_TASK_OVER = 2;
	public static final int STATUS_TASK_IDILLEAGE = 3;
	public static final int STATUS_ACTIVITY_INVALID = 4;
	public static final int STATUS_ACTIVITY_DEALING = 5;
	public static final int STATUS_ACTIVITY_OVER = 6;
	public static final int STATUS_ACTIVITY_PREFIX_UNOVER = 7;
	public static final int STATUS_ACTIVITY_SENDER_UNMATCH = 8;
	public static final int STATUS_PROC_EXCEPTION = 9;
	public static final int STATUS_EDIT_MESSAGE_EXCEPTION = 10;
	public static final int STATUS_RECV_PROCESS_EXCEPTION = 11;
	public static final int STATUS_SEND_PROCESS_EXCEPTION = 12;
	public static final int STATUS_XSD_VALID_FAILURE = 13;
	public static final int STATUS_XSD_PARSE_FAILURE = 14;
	public static final int STATUS_UNKNOWN_MESSAGETYPE = 15;
	public static final int STATUS_EC_ADDRESS_WRONG = 16;

	/**
	 * 获取详细的处理结果信息
	 * @return
	 */
	public static String getProcDetail(int procResult){
		String retVal = "";
		switch(procResult){
			case STATUS_MESSAGE_NULL: retVal = "接收的报文为空，不合法"; break;
			case STATUS_SUCCESS: retVal = "处理成功"; break;
			case STATUS_FLOW_NULL: retVal = "无效的流程号"; break;
			case STATUS_TASK_OVER: retVal = "任务已结束"; break;
			case STATUS_TASK_IDILLEAGE: retVal = "任务ID不合规则"; break;
			case STATUS_ACTIVITY_INVALID: retVal = "活动ID无效"; break;
			case STATUS_ACTIVITY_DEALING: retVal = "活动正在处理中"; break;
			case STATUS_ACTIVITY_OVER: retVal = "活动已完成"; break;
			case STATUS_ACTIVITY_PREFIX_UNOVER: retVal = "本次活动的前置活动未完成"; break;
			case STATUS_ACTIVITY_SENDER_UNMATCH: retVal = "发送者与活动号不匹配"; break;
			case STATUS_PROC_EXCEPTION: retVal = "流程处理中异常"; break;
			case STATUS_EDIT_MESSAGE_EXCEPTION: retVal = "修改报文异常"; break;
			case STATUS_RECV_PROCESS_EXCEPTION: retVal = "报文接收预处理异常"; break;
			case STATUS_SEND_PROCESS_EXCEPTION: retVal = "报文发送预处理异常"; break;
			case STATUS_XSD_VALID_FAILURE: retVal = "报文校验失败";break;
			case STATUS_XSD_PARSE_FAILURE: retVal = "报文解析失败";break;
			case STATUS_UNKNOWN_MESSAGETYPE: retVal = "未知的报文类型";break;
			case STATUS_EC_ADDRESS_WRONG: retVal = "地址格式不正确或发送者地址错误";break;
			default:retVal = "未知错误";
		}
		return retVal;
	}
}
